module.exports = function(sequelize, DataTypes) {
    return sequelize.define(
        "project",
        {
            id: {
                type: DataTypes.STRING(36),
                allowNull: false,
                primaryKey: true,
                defaultValue: DataTypes.UUIDV4
            },
            admin_id: {
                type: DataTypes.STRING,
                allowNull: false,
                references: {
                    model: "users",
                    key: "id",
                },
            },
            name: {
                type: DataTypes.STRING,
                allowNull: false,
                validate: {
                    isEmail: true
                }
            },
            description: {
                type: DataTypes.STRING,
            },
        }
    )
}
